@extends('master')

@section('title', '产品管理')

@section('content')
<div class="row">
    <div class="col-md-12">
        @include('message')
        <p class="lead">
            发布新产品
        </p>
    </div>
</div>
<div class="row">
    <% Form::open(array('route' => 'admin.products.store', 'files' => true)) %>
    <div class="col-md-9">
        <div class="form-group">
            <% Form::text('title',null,array('class' => 'form-control input-lg', 'placeholder' => '产品标题')) %>
            <%$errors->first('title', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
        </div>
        <div class="form-group">
            <% Form::textarea('content',null,array('class' => 'form-control')) %>
            <% $errors->first('content', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
        </div>
    </div>
    <div class="col-md-3">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    发布
                </h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label for="product_status" class="control-label">产品状态</label>
                    <% Form::select('status', array('0' =>'草稿', '1' => '发布'), null, array('class' => 'form-control')) %>
                    <% $errors->first('status', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
                </div>
                <button class="btn btn-info btn-md pull-right" type="submit">发布</button>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    简介
                </h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label for="product_intro" class="control-label">简介</label>
                    <% Form::text('intro', null, array('class' => 'form-control')) %>
                    <% $errors->first('intro', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    特色图片
                </h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label for="product_thumbnail" class="control-label">产品缩略图</label>
                    <% Form::file('thumbnail', array('class' => 'form-control')) %>
                    <p class="help-block">建议上传正方形的缩略图</p>
                    <% $errors->first('thumbnail', '<p class="help-block"><span class="text-danger">:message</span></p>') %>
                </div>
            </div>
        </div>
    </div>
    <% Form::close() %>
</div>

@stop